package com.ruoyi.customer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.customer.mapper.ErpErpcustomerInfoMapper;
import com.ruoyi.customer.domain.ErpErpcustomerInfo;
import com.ruoyi.customer.service.IErpErpcustomerInfoService;

/**
 * 客户资料Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-28
 */
@Service
public class ErpErpcustomerInfoServiceImpl implements IErpErpcustomerInfoService 
{
    @Autowired
    private ErpErpcustomerInfoMapper erpErpcustomerInfoMapper;

    /**
     * 查询客户资料
     * 
     * @param id 客户资料主键
     * @return 客户资料
     */
    @Override
    public ErpErpcustomerInfo selectErpErpcustomerInfoById(String id)
    {
        return erpErpcustomerInfoMapper.selectErpErpcustomerInfoById(id);
    }

    /**
     * 查询客户资料列表
     * 
     * @param erpErpcustomerInfo 客户资料
     * @return 客户资料
     */
    @Override
    public List<ErpErpcustomerInfo> selectErpErpcustomerInfoList(ErpErpcustomerInfo erpErpcustomerInfo)
    {
        return erpErpcustomerInfoMapper.selectErpErpcustomerInfoList(erpErpcustomerInfo);
    }

    /**
     * 新增客户资料
     * 
     * @param erpErpcustomerInfo 客户资料
     * @return 结果
     */
    @Override
    public int insertErpErpcustomerInfo(ErpErpcustomerInfo erpErpcustomerInfo)
    {
        erpErpcustomerInfo.setCreateTime(DateUtils.getNowDate());
        return erpErpcustomerInfoMapper.insertErpErpcustomerInfo(erpErpcustomerInfo);
    }

    /**
     * 修改客户资料
     * 
     * @param erpErpcustomerInfo 客户资料
     * @return 结果
     */
    @Override
    public int updateErpErpcustomerInfo(ErpErpcustomerInfo erpErpcustomerInfo)
    {
        return erpErpcustomerInfoMapper.updateErpErpcustomerInfo(erpErpcustomerInfo);
    }

    /**
     * 批量删除客户资料
     * 
     * @param ids 需要删除的客户资料主键
     * @return 结果
     */
    @Override
    public int deleteErpErpcustomerInfoByIds(String[] ids)
    {
        return erpErpcustomerInfoMapper.deleteErpErpcustomerInfoByIds(ids);
    }

    /**
     * 删除客户资料信息
     * 
     * @param id 客户资料主键
     * @return 结果
     */
    @Override
    public int deleteErpErpcustomerInfoById(String id)
    {
        return erpErpcustomerInfoMapper.deleteErpErpcustomerInfoById(id);
    }
}
